import {hrAjax as proFetch} from 'src/hrpub/common/utils/utils';

export default function getTransData(param_str) {
    const {orgVal, transType, editTable, transState, func_type} = this.props;
    let postData = {
        func_type,
        inout: transType,
        param_str,
        pk_org: orgVal.refpk,
        transstate: transState
    };

    return proFetch({
        url: '/nccloud/hrtrn/pub/RecordsPsntransterReceiveCheckAction.do',
        body: postData,
    })
        .then((res) => {
            if (res.success) {
                editTable.setTableData('PsnReceive', {
                    rows: res.data['PsnReceive'].rows
                })
            }
        });
}
